package de.busschedule.control;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import de.busschedule.view.CityBusFragment;
import de.busschedule.view.NightBusFragment;
import de.busschedule.view.RegionalBusFragment;

public class TabsPagerAdapter extends FragmentPagerAdapter{

	public TabsPagerAdapter(FragmentManager fm){
		super(fm);
	}

	@Override
	public Fragment getItem(int index){
		switch(index){
		case 0:
			// Top Rated fragment activity
			return new CityBusFragment();
		case 1:
			// Games fragment activity
			return new RegionalBusFragment();
		case 2:
			// Movies fragment activity
			return new NightBusFragment();
		}

		return null;
	}

	@Override
	public int getCount(){
		// get item count - equal to number of tabs
		return 3;
	}
}